﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy;
using Volo.Abp;
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;

namespace BaseInfo
{
    [Comment("产品")]
    [Table("t_base_agencyproduct")]
    public class AgencyProduct : AuditedAggregateRoot<Guid>, ISoftDelete, IMultiTenant
    {
        public AgencyProduct(Guid keyId)

        {
            this.Id = keyId;
        }
        /// <summary>
        /// 产品编码
        /// </summary>
        [MaxLength(100)]
        [Comment("产品编码")]
        public string ProductCode { get; set; }

        /// <summary>
        /// 产品名称
        /// </summary>
        [MaxLength(300)]
        [Comment("产品名称")]
        public string ProductName { get; set; }
        /// <summary>
        /// 别名
        /// </summary>
        [MaxLength(300)]
        [Comment("别名")]
        public string OtherName { get; set; }
       
        [MaxLength(300)]
        [Comment("规格")]
        public string Specification { get; set; }
       
        [MaxLength(100)]
        [Comment("型号")]
        public string ModelContent { get; set; }

        [MaxLength(100)]
        [Comment("生厂商标识")]
        public Guid ManufactureId { get; set; }

        [MaxLength(10)]
        [Comment("计量单位")]
        public string UseUnit { get; set; }

      
        [Comment("采购单价")]
        [Column(TypeName = "decimal(18,4)")]
        public decimal PurcPrice { get; set; }
   
        [Comment("销售单价")]
        [Column(TypeName = "decimal(18,4)")]
        public decimal SellPrice { get; set; }
    
        [Comment("院内加价")]
        [Column(TypeName = "decimal(18,4)")]
        public decimal RaisePrice { get; set; }
      
        [Comment("最小包装单位名称")]
        [MaxLength(10)]
        public string MinPackUnit { get; set; }

       
        [Comment("最小包装数量")]
        [Column(TypeName = "decimal(18,4)")]
        public decimal MinPackCount { get; set; }

        [Comment("最小包装单价")]
        [Column(TypeName = "decimal(18,4)")]
        public decimal MinPrice { get; set; }
       
        [MaxLength(10)]
        [Comment("中包装单位名称")]
        public string MidPackUnit { get; set; }
    
        [Comment("中包装数量")]
        [Column(TypeName = "decimal(18,4)")]
        public decimal? MidPackCount { get; set; }
     
        [Comment("中包装单价")]
        [Column(TypeName = "decimal(18,4)")]
        public decimal? MidPrice { get; set; }
     
        [Comment("产品大类名称")]
        [MaxLength(100)]
        public string ProductClassName { get; set; }

       
        [Comment("产品大类标识")]
        [MaxLength(100)]
        public Guid? ProductClassId { get; set; }

 
        [Comment("产品小类名称")]
        [MaxLength(100)]
        public string ProductMinClassName { get; set; }

        [Comment("产品小类标识")]
        [MaxLength(100)]
        public string ProductMinClassId { get; set; }


        [Comment("是否启用  0-禁用 1-启用")]
        public int IsActive { get; set; }



        [MaxLength(100)]
        [Comment("注册证号")]
        public string RegisteredCardCode { get; set; }

        [Column(TypeName = "decimal(18,4)")]
        [Comment("中标价")]
        public decimal WinningPrice { get; set; }
    
        [MaxLength(200)]
        [Comment("中标号")]
        public string WinningCode { get; set; }
    
        [MaxLength(50)]
        [Comment("英文名")]
        public string EnglishName { get; set; }
    
        [MaxLength(100)]
        [Comment("Uid码")]
        public string UidCode { get; set; }
    
        [MaxLength(100)]
        [Comment("医保代码")]
        public string HealthCode { get; set; }
     
        [MaxLength(100)]
        [Comment("医保分类代码")]
        public string HealthClassCode { get; set; }
       
        [Comment("是否无菌包装  0:否, 1:是")]
        public int IsAsepticPack { get; set; }
     
        [Comment("是否需要灭菌 0:否, 1:是")]
        public int IsNeedSterilization { get; set; }

        [MaxLength(50)]
        [Comment("灭菌方式")]
        public string SterilizationWay { get; set; }
      
        [MaxLength(200)]
        [Comment("备注")]
        public string Remark { get; set; }
    
        [MaxLength(2000)]
        [Comment("产品图片url")]
        public string ProductPictureUrl { get; set; }

        [MaxLength(100)]
        [Comment("药交id")]
        public string DrugTradeId { get; set; }
        /// <summary>
        /// 助记码
        /// </summary>
        [MaxLength(200)]
        [Comment("助记码")]
        public string MnemCode { get; set; }
        public AgencyProduct()
        {

        }

        public bool IsDeleted { get; set; } = false;

        public Guid? TenantId { get; set; }
    }
}
